Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12210: In technique editor, on save, we get "success" but some errors are shallowed #877

Conversation

VinceMacBuche
Copy link
Member

}
var saveError = function(action, data) {
return $scope.handle_error("while "+action+" Technique '"+ data.technique.name+"'")
return handle_error("while "+action+" Technique '"+ data.technique.name+"'")
}

// Actually save the technique through API
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

// Actually save the technique through API
    if ($scope.originalTechnique.bundle_name === undefined) {
      $http.post("/ncf/api/techniques", data).success(saveSuccess).error(saveError("creating", data)).finally(function(){$scope.$broadcast('endSaving');});
    } else {
      $http.put("/ncf/api/techniques", data).success(saveSuccess).error(saveError("saving", data)).finally(function(){$scope.$broadcast('endSaving');});
    }

@@ -1112,44 +1113,53 @@ $scope.onImportFileChange = function (fileEl) {
ncfTechnique = data.data.data.technique;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one data too many

@VinceMacBuche VinceMacBuche force-pushed the bug_12210/in_technique_editor_on_save_we_get_success_but_some_errors_are_shallowed branch from 3badec2 to bd2560e Compare November 14, 2018 12:07
@VinceMacBuche
Copy link
Member Author

Commit modified

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit bd2560e into Normation:branches/rudder/4.3 Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants